import Loading from './components/Loading';
import { lazy, Suspense } from 'react'
import { Switch, Redirect, Route } from 'react-router-dom/cjs/react-router-dom'
import Welcome from './views/dashboard/Welcome'
const Login = lazy(() => import('@/views/login/Index'))

function App() {
  return (
    <div className="App">
      <Suspense fallback={<Loading />}>
        <Switch>
          <Route path='/login' component={Login} />
          <Route path='/dashboard' component={Welcome} />
          <Redirect from='/' to='/login' exact />

        </Switch>
      </Suspense>
    </div>
  );
}

export default App;
